// DBResponse.java
package com.nosql.common.protocol;

import java.io.Serializable;

public class DBResponse implements Serializable {
    public enum Status { SUCCESS, NOT_FOUND, ERROR }
    public static final long serialVersionUID = 1L;
    private final Status status;
    private final Object data;
    private final String error;

    public DBResponse(Status status, Object data) {
        this(status, data, null);
    }

    public DBResponse(Status status, Object data, String error) {
        this.status = status;
        this.data = data;
        this.error = error;
    }

    // Getters
    public Status getStatus() { return status; }
    public Object getData() { return data; }
    public String getError() { return error; }
}
